package com.asset.dispoal.configurationBatch.service.commom;

import com.asset.dispoal.configurationBatch.domain.db.entity.ConfigurationBatchAll;
import com.asset.dispoal.configurationBatch.domain.db.mapper.ConfigurationBatchMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import tech.mhuang.pacebox.core.ddd.BaseCommand;
import tech.mhuang.pacebox.springboot.protocol.Result;

import java.util.List;

/**
 * @author qr
 * @date 2022/3/25$
 */
@Component
public class ConfigurationBatchQueryAllCommand implements BaseCommand<String, Result> {


    @Autowired
    ConfigurationBatchMapper configurationBatchMapper;

    @Override
    public Result execute(String request) {
        List<ConfigurationBatchAll> query = configurationBatchMapper.queryById(request);
        return Result.ok(query);
    }
}
